﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using Jumpton.Data;
using Jumpton.Persistent;
using Jumpton.SFA.Server.Entity;

namespace Jumpton.SFA.Server.BusinessRule.System
{
    public class ConfigManager
    {
      
        public SystemConfig GetSystemConfig(string Key1, string Key2, decimal DomainID)
        {
            return (SystemConfig)ObjectRow.Load(typeof(SystemConfig), string.Format("this.Key1='{0}' and this.Key2='{1}' and DOMAIN_ID={2}", Key1, Key2, DomainID));
        }

       

       

    }

    /// <summary>
    /// 字典枚举
    /// </summary>
    public class ConfigEnum
    {
        //将目前的拜访类型的配置功能移动KEY1='K002'，KEY2='001'
        //是否开启手机与账户捆绑，KEY1='K001'，KEY2='001'，值可以为0,1，1表示开启，0表示不开启"
        //"定义用户账号类型，1内部账号 2 经销商账号，3供应商 KEY1='K003'，KEY2='001‘，’002’,‘003'"
        //默认密码 KEY1='K004'，KEY2='001‘

        /// <summary>
        /// 默认密码
        /// </summary>
        public const string DEFAULT_PASSWORD = "K004";
        /// <summary>
        /// Account Type
        /// </summary>
        public const string ACCOUNT_TYPE = "K003";

        /// <summary>
        /// 设备账号捆绑
        /// </summary>
        public const string ENABLE_DEVICE_BOUND = "K001";

        /// <summary>
        /// 设备账号捆绑
        /// </summary>
        public const string VISIT_CONFIG = "K002";

        public const string SUB_KEY001 = "K001";
        public const string SUB_KEY002 = "K002";
        public const string SUB_KEY003 = "K003";
        public const string SUB_KEY004 = "K004";
        public const string SUB_KEY005 = "K005";
        public const string SUB_KEY006 = "K006"; 
    }
}
